using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace HostMonitor
{
    public partial class SettingsFrm : Form
    {
        protected SettingsFrm()
        {
            InitializeComponent();
            udTimeout.Value = Config.Timeout;
            udMaxAsyncPings.Value = Config.MaxAsyncPings;
            udInterval.Value = Config.Interval;
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            Config.Timeout = (int)udTimeout.Value;
            Config.MaxAsyncPings = (int)udMaxAsyncPings.Value;
            Config.Interval = (int)udInterval.Value;
            Close();
        }

        static public void OpenDialog()
        {
            SettingsFrm frm = new SettingsFrm();
            frm.ShowDialog();
        }
    }
}